/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.barbecue.signup.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.zx.barbecue.signup.entity.TbarbecueSignup;
import com.jeesite.modules.zx.barbecue.signup.dao.TbarbecueSignupDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * 考试报名表Service
 * @author zpp
 * @version 2020-01-19
 */
@Service
@Transactional(readOnly=true)
public class TbarbecueSignupService extends CrudService<TbarbecueSignupDao, TbarbecueSignup> {
	
	/**
	 * 获取单条数据
	 * @param tbarbecueSignup
	 * @return
	 */
	@Override
	public TbarbecueSignup get(TbarbecueSignup tbarbecueSignup) {
		return super.get(tbarbecueSignup);
	}
	
	/**
	 * 查询分页数据
	 * @param tbarbecueSignup 查询条件
	 * @param tbarbecueSignup.page 分页对象
	 * @return
	 */
	@Override
	public Page<TbarbecueSignup> findPage(TbarbecueSignup tbarbecueSignup) {
		return super.findPage(tbarbecueSignup);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param tbarbecueSignup
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(TbarbecueSignup tbarbecueSignup) {
		super.save(tbarbecueSignup);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(tbarbecueSignup.getId(), "tbarbecueSignup_image");
		// 保存上传附件
		FileUploadUtils.saveFileUpload(tbarbecueSignup.getId(), "tbarbecueSignup_file");
	}
	
	/**
	 * 更新状态
	 * @param tbarbecueSignup
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(TbarbecueSignup tbarbecueSignup) {
		super.updateStatus(tbarbecueSignup);
	}
	
	/**
	 * 删除数据
	 * @param tbarbecueSignup
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(TbarbecueSignup tbarbecueSignup) {
		super.delete(tbarbecueSignup);
	}
	
}